const app = getApp()
var module=require("../../utils/public.js");
Page({
  data: {
  	language:'',
    title:'',
    content:null,
    nodes:[],
  },
  onLoad: function () {
    var lang = app.globalData.lang;
    if (lang != "zh") {
      wx.setNavigationBarTitle({
        title: 'Detail'
      })
    }
    console.log(lang);
    const that=this;
    wx.request({
      url:app.globalData.url+'index/getPublic',
      method:'POST',
      data:{language:lang},
      success:function(msg){
        that.setData({
          title:msg.data.data.title,
          content:msg.data.data.content,
        });
      },fail:function(e){
        console.log(e);
      }
    });
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    var that = this;
    return {
      title: app.globalData.shareTitle,
      path: app.globalData.sharePath,
      imageUrl: '../../../../images/share_img.png',
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  },
})